import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/LoginView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/sys-admin',
    component: () => import('../views/HomeView.vue'),
    redirect:"/sys-admin/AdminView",
    children:[
      {
        path:'/AdminView',
        component: () => import('../views/HomeView.vue')
      },
      {
        path:'/brand-list',
        component: () => import('../views/temp/BrandListView.vue')

      },
      {
        path:'/brand-add-new',
        component: () => import('../views/temp/BrandAddNewView.vue')

      }
      ,
      {
        path:'/AlbumManagement',
        component: () => import('../views/temp/AlbumManagement.vue')

      },
      {
        path:'/BrandManagement',
        component: () => import('../views/temp/BrandManagement.vue')

      },
      {
        path:'/GroupCode',
        component: () => import('../views/temp/GroupCode.vue')

      },
      {
        path:'/TypeTraits',
        component: () => import('../views/temp/TypeTraits.vue')

      }
    ]
  },
  {
    path: '/about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/',
    component: LoginView
  },
  {
    path: '/reg',
    component: () => import('../views/RegView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
